<template>
	<view class="box">
		<view class="projectImg">
			<view class="img">
				<image :src="imageurl + userinfo.image" mode=""></image>
			</view>
			<text>{{userinfo.name}}</text>
		</view>
		<view class="projectIntroduce">
			<h3>项目介绍</h3>
			<text>{{userinfo.projectIntroduce}}</text>
		</view>
		<view class="intended">
			<h3>适用人群</h3>
			<text>{{userinfo.fitCrowd}}</text>
		</view>
		<view class="Taboo">
			<h3>禁忌人群</h3>
			<text>{{userinfo.tabooCrowd}}</text>
		</view>
		<view class="technologicalProcess">
			<h3>项目流程</h3>
			<text>{{userinfo.projectProcess}}</text>
		</view>
		<view class="maintain">
			<h3>保养方法</h3>
			<text>{{userinfo.maintainMethod}}</text>
		</view>
		<view class=""style="width: 750rpx;height: 60rpx;">
			
		</view>
		<view class="appointment">
			<button class="cu-btn bg-red margin-tb-sm lg" @click="toselect">移除项目</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',//项目id
				userinfo:{},//数据
				imageurl:this.$imgurl,
			}
		},
		onLoad(option) {
			this.userinfo = JSON.parse(option.data) 
			console.log('项目信息',this.userinfo)
		},
		methods: {
			//移除项目
			toselect(){
				var that = this
				var data = {
				}
				that.$http("/api/user/project/delete/" + that.userinfo.id ,'POST', data).then((res) => {
					uni.showToast({
						title:"删除成功"
					})
					setTimeout(function(){
						uni.navigateBack({
							delta:1
						})
					},1500)
				})
			},
		}
	}
</script>

<style lang="scss">
	.box {
		width: 750rpx;

		.projectImg {
			width: 100%;
			height: 250rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;

			.img {
				width: 150rpx;
				height: 150rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			text {
				font-size: 28rpx;
				font-weight: bold;
				margin-top: 20rpx;
			}
		}

		.projectIntroduce {
			width: 750rpx;
			padding: 0 30rpx 30rpx 30rpx;
			border-bottom: 2px solid #CECECE;

			h3 {
				font-size: 28rpx;
				font-weight: bold;
				margin-bottom: 10rpx;
			}

			text {
				font-size: 25rpx;
				color: #8E8E8E;
				line-height: 40rpx;
			}
		}

		.intended {
			margin-top: 20rpx;
			width: 750rpx;
			padding: 0 30rpx 30rpx 30rpx;
			border-bottom: 2px solid #CECECE;

			h3 {
				font-size: 28rpx;
				font-weight: bold;
				margin-bottom: 10rpx;
			}

			text {
				font-size: 25rpx;
				color: #8E8E8E;
				line-height: 40rpx;
			}
		}

		.Taboo {
			margin-top: 20rpx;
			width: 750rpx;
			padding: 0 30rpx 30rpx 30rpx;
			border-bottom: 2px solid #CECECE;

			h3 {
				font-size: 28rpx;
				font-weight: bold;
				margin-bottom: 10rpx;
			}

			li {
				font-size: 25rpx;
				color: #8E8E8E;
			}
		}

		.technologicalProcess {
			margin-top: 20rpx;
			width: 750rpx;
			padding: 0 30rpx 30rpx 30rpx;
			border-bottom: 2px solid #CECECE;

			h3 {
				font-size: 28rpx;
				font-weight: bold;
				margin-bottom: 10rpx;
			}

			text {
				font-size: 25rpx;
				color: #8E8E8E;
				line-height: 40rpx;
			}
		}
		.maintain{
			margin-top: 20rpx;
			width: 750rpx;
			padding: 0 30rpx 30rpx 30rpx;
			border-bottom: 2px solid #CECECE;
			
			h3 {
				font-size: 28rpx;
				font-weight: bold;
				margin-bottom: 10rpx;
			}
			
			li {
				font-size: 25rpx;
				color: #8E8E8E;
			}
		}
        .appointment{
			width: 750rpx;
			button{
				width: 100%;
				position: fixed;
				bottom: 0;
				margin-bottom: 0;
			}
		}
	}
</style>
